package cn.opopopo.design_pattern_learn.结构型.adapter;

public class AdapterPatternDemo {
    public static void main(String[] args) {
        // 创建旧系统实例
        LegacyPaymentSystem legacySystem = new LegacyPaymentSystem();

        // 使用适配器包装旧系统
        PaymentProcessor processor = new PaymentAdapter(legacySystem);

        // 新系统调用统一接口
        processor.processPayment(99.9);
    }
}